require 'rubygems'
require 'wx'

class Obj_ctl_points
	def initialize(parent)
		@parent = parent

		# Label
		label1 = Wx::StaticText.new(parent, -1, 'Player1 - Point:', [15, 30], [70, 35], Wx::ALIGN_RIGHT)
		label2 = Wx::StaticText.new(parent, -1, 'Player2 - Point:', [15,100], [70, 35], Wx::ALIGN_RIGHT)

		# TextCtrl: Point (Red & Blue)
		@text_point1 = Wx::RichTextCtrl.new(parent, -1, '', [90,  20], [120, 60], Wx::TE_READONLY | Wx::ALIGN_RIGHT)
		@text_point2 = Wx::RichTextCtrl.new(parent, -1, '', [90,  95], [120, 60], Wx::TE_READONLY | Wx::ALIGN_RIGHT)
	
		font_point = Wx::Font.new(Wx::NORMAL_FONT.get_point_size * 3, Wx::DEFAULT, Wx::NORMAL, Wx::NORMAL) 
		@text_point1.set_background_colour(Wx::BLACK)
		@text_point1.set_font(font_point)
		@text_point1.set_default_style(Wx::RichTextAttr.new(Wx::RED))
		@text_point1.append_text("Point1")
	
		@text_point2.set_background_colour(Wx::BLACK)
		@text_point2.set_font(font_point)
		@text_point2.set_default_style(Wx::RichTextAttr.new(Wx::BLUE))
		@text_point2.append_text("Point2")

	end
	
	def update_point1(str)
		@text_point1.set_value(str)
	end

	def update_point2(str)
		@text_point2.set_value(str)
	end

end
